import Vue from 'vue'
import Vuex from 'vuex'
import getters from './getters'
import app from './modules/app'
import settings from './modules/settings'
import user from './modules/user'

Vue.use(Vuex)

// const req = require.context('./modules', false, /\.js$/)
// console.log(req)
// console.log(req.keys(), 'req.keys()')
// const mName=req.keys().map(item=>.split('./')[1]).map(item=>item.split('.js')[0])

const store = new Vuex.Store({
  modules: {
    app,
    settings,
    user
  },
  getters
})

export default store
